home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / ImageWriter--custom dialogs / ImageWriter.make < prev    next >
Encoding:
Text File  |  1995-06-20  |  5.8 KB  |  190 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        ImageWriter.make
  3. #
  4. #    Contains:    Makefile for the sample ImageWriter II driver.
  5. #
  6. #    Copyright:    © 1983-1994 by Apple Computer, Inc., all rights reserved.
  7. #
  8. #    Change History (most recent first):
  9. #
  10. #                12/22/93    dmh        Added custom dialog code.
  11. #                 9/12/93    dmh        Modified for b2 seed.
  12. #                 4/26/93    dmh        Modified for b1 seed.
  13. #                 2/04/93    dmh        Modified for a5 seed.
  14. #         <5>    10/22/92    DB        Added changes for version control
  15. #
  16. #
  17.  
  18. #======= Point these variables to your interface and library directories =======
  19.  
  20. GraphicsInterfaces    =    {CIncludes}
  21. GXLibrariesSources    =    {CIncludes}
  22.  
  23.  
  24. #========== Directories Containing Source and Object Files ==========
  25.  
  26. ObjDir                    =    :Objects:
  27. SrcDir                    =    
  28. DestDir                    =    
  29.  
  30.  
  31. #========== Compiler Options ==========
  32.  
  33. AsmOptions                =    -case obj
  34. RezOptions                =    -i {GraphicsInterfaces} -d SystemSevenOrLater=1
  35. COptions                =    -mbg off -b2 -i {GraphicsInterfaces}
  36. LinkOptions                =    -ra =resSysHeap,resPurgeable
  37.  
  38. DriverName         = ImageWriter
  39. DriverType         = 'pdvr'
  40. DriverCreator     = 'IWcd'
  41. NewSegID        = 0
  42. OldSegID        = 1
  43.  
  44. # Compile and assemble statements
  45. {ObjDir}OldApp.c.o ƒƒ {SrcDir}OldApp.c
  46.     Echo "{DriverName}: Compiling old application"
  47.     C {COptions} -o {ObjDir} {SrcDir}OldApp.c
  48.  
  49. {ObjDir}OldApp.a.o    ƒ     {SrcDir}OldApp.a
  50.     Echo "{DriverName}: Assembling old app jump table"
  51.     Asm {AsmOptions} {MakeJumpTable} {SrcDir}OldApp.a -o {ObjDir}
  52.  
  53. {ObjDir}NewApp.c.o    ƒ {SrcDir}NewApp.c
  54.     Echo "{DriverName}: Compiling new application"
  55.     C {COptions} -o {ObjDir} {SrcDir}NewApp.c
  56.  
  57. {ObjDir}NewApp.a.o    ƒ     {SrcDir}NewApp.a
  58.     Echo "{DriverName}: Assembling new app jump table"
  59.     Asm {AsmOptions} {MakeJumpTable} {SrcDir}NewApp.a -o {ObjDir}
  60.  
  61. {ObjDir}CommonCode.c.o    ƒ     {SrcDir}CommonCode.c
  62.     Echo "{DriverName}: Compiling common code"
  63.     C {COptions} -o {ObjDir} {SrcDir}CommonCode.c
  64.  
  65. {ObjDir}ChooserSupport.c.o    ƒ {SrcDir}ChooserSupport.c
  66.     Echo "{DriverName}: Compiling Chooser support"
  67.     C {COptions} -o {ObjDir} {SrcDir}ChooserSupport.c
  68.  
  69. {ObjDir}ChooserSupport.a.o    ƒ     {SrcDir}ChooserSupport.a
  70.     Echo "{DriverName}: Assembling Chooser support"
  71.     Asm {AsmOptions} {MakeJumpTable} {SrcDir}ChooserSupport.a -o {ObjDir}
  72.  
  73. # Link and Rez statements
  74. {DestDir}{DriverName} ƒƒ {SrcDir}OldApp.r
  75.     Echo "{DriverName}: Rezzing old application"
  76.     Rez {RezOptions} -append -o {DestDir}{DriverName} {SrcDir}OldApp.r
  77.     SetFile -a Bi -t {DriverType} -c {DriverCreator} {DestDir}{DriverName}
  78.         
  79. {DestDir}{DriverName} ƒƒ {ObjDir}OldApp.c.o
  80.     Echo "{DriverName}: Linking old application"
  81.     SetFile -a Bi -t {DriverType} -c {DriverCreator} {DestDir}{DriverName}
  82.  
  83. "{ObjDir}text library.c.o"        ƒ {GXLibrariesSources}"text library.c"
  84.     Echo "compiling text library.c"
  85.     C {COptions} -o {ObjDir} {GXLibrariesSources}"text library.c"
  86.  
  87. "{ObjDir}picture library.c.o"        ƒ {GXLibrariesSources}"picture library.c"
  88.     Echo "compiling picture library.c"
  89.     C {COptions} -o {ObjDir} {GXLibrariesSources}"picture library.c"
  90.  
  91. "{ObjDir}font library.c.o"        ƒ {GXLibrariesSources}"font library.c"
  92.     Echo "compiling font library.c"
  93.     C {COptions} -o {ObjDir} {GXLibrariesSources}"font library.c"
  94.  
  95. "{ObjDir}color library.c.o"        ƒ {GXLibrariesSources}"color library.c"
  96.     Echo "compiling color library.c"
  97.     C {COptions} -o {ObjDir} {GXLibrariesSources}"color library.c"
  98.  
  99. "{ObjDir}graphics library.c.o"        ƒ {GXLibrariesSources}"graphics library.c"
  100.     Echo "compiling graphics library.c"
  101.     C {COptions} -o {ObjDir} {GXLibrariesSources}"graphics library.c"
  102.  
  103. {DestDir}{DriverName} ƒƒ {SrcDir}NewApp.r
  104.     Echo "{DriverName}: Rezzing new application"
  105.     Rez {RezOptions} -append -o {DestDir}{DriverName} {SrcDir}NewApp.r
  106.     SetFile -a Bi -t {DriverType} -c {DriverCreator} {DestDir}{DriverName}
  107.  
  108. {DestDir}{DriverName} ƒƒ                         ∂
  109.     {ObjDir}NewApp.a.o                            ∂
  110.     {ObjDir}NewApp.c.o                            ∂
  111.     "{ObjDir}text library.c.o"                    ∂
  112.     "{ObjDir}picture library.c.o"                ∂
  113.     "{ObjDir}font library.c.o"                    ∂
  114.     "{ObjDir}color library.c.o"                    ∂
  115.     "{ObjDir}graphics library.c.o"                ∂
  116.     {ObjDir}CommonCode.c.o
  117.     Echo "{DriverName}: linking new API"
  118.     Link                                        ∂
  119.         {ObjDir}NewApp.a.o                        ∂
  120.         {ObjDir}NewApp.c.o                        ∂
  121.         {ObjDir}CommonCode.c.o                    ∂
  122.         ∂
  123.         "{ObjDir}text library.c.o"                ∂
  124.         "{ObjDir}picture library.c.o"            ∂
  125.         "{ObjDir}font library.c.o"                ∂
  126.         "{ObjDir}color library.c.o"                ∂
  127.         "{ObjDir}graphics library.c.o"            ∂
  128.         ∂
  129.         "{Libraries}Interface.o"                 ∂
  130.         "{Libraries}Runtime.o"                     ∂
  131.         -msg nodup                                 ∂
  132.         ∂
  133.         {LinkOptions}                            ∂
  134.         -rt {DriverType}={NewSegID}                ∂
  135.         -c {DriverCreator}                        ∂
  136.         -t {DriverType}                            ∂
  137.         -sg {DriverName}                        ∂
  138.         -m SD_JumpTable                            ∂
  139.         ∂
  140.         -o {DestDir}{DriverName}
  141.     SetFile -a Bi -t {DriverType} -c {DriverCreator} {DestDir}{DriverName}
  142.  
  143. {DestDir}{DriverName} ƒƒ                         ∂
  144.     {ObjDir}OldApp.a.o                            ∂
  145.     {ObjDir}OldApp.c.o                            ∂
  146.     {ObjDir}CommonCode.c.o
  147.     Echo "{DriverName}: linking old API"
  148.     Link                                        ∂
  149.         {ObjDir}OldApp.a.o                        ∂
  150.         {ObjDir}OldApp.c.o                        ∂
  151.         {ObjDir}CommonCode.c.o                    ∂
  152.         ∂
  153.         "{Libraries}Interface.o"                 ∂
  154.         "{Libraries}Runtime.o"                     ∂
  155.         ∂
  156.         {LinkOptions}                            ∂
  157.         -rt {DriverType}={OldSegID}                ∂
  158.         -c {DriverCreator}                        ∂
  159.         -t {DriverType}                            ∂
  160.         -sg {DriverName}                        ∂
  161.         -m SD_JumpTable                            ∂
  162.         ∂
  163.         -o {DestDir}{DriverName}
  164.     SetFile -a Bi -t {DriverType} -c {DriverCreator} {DestDir}{DriverName}
  165.  
  166. {DestDir}{DriverName} ƒƒ {SrcDir}ChooserSupport.r
  167.     Echo "{DriverName}: Rezzing Chooser resources"
  168.     Rez {RezOptions} -append -o {DestDir}{DriverName} {SrcDir}ChooserSupport.r
  169.     SetFile -a Bi -t {DriverType} -c {DriverCreator} {DestDir}{DriverName}
  170.  
  171. {DestDir}{DriverName} ƒƒ                         ∂
  172.     {ObjDir}ChooserSupport.a.o                    ∂
  173.     {ObjDir}ChooserSupport.c.o
  174.     Echo "{DriverName}: Linking PACK"
  175.     Link                                        ∂
  176.         {ObjDir}ChooserSupport.a.o                ∂
  177.         {ObjDir}ChooserSupport.c.o                ∂
  178.         ∂
  179.         "{Libraries}Interface.o"                 ∂
  180.         ∂
  181.         -rt PACK=-4096                            ∂
  182.         -sg PrintingPACK                        ∂
  183.         -m EntryPoint                            ∂
  184.         ∂
  185.         -o {Targ}
  186.  
  187. {DestDir}{DriverName}    ƒƒ {ObjDir}ChooserSupport.c.o
  188.     Echo "{DriverName}: Linking LDEF"
  189.     Link -w -rt LDEF=-4096 -m LDEF -sg LDEF -o {Targ} {ObjDir}ChooserSupport.c.o
  190.